import store from "./../store";
export default{
  checkColumn:function(columnName){
    let isExist = false;
    let colPermissionsStr = store.getters.columns;
    if (colPermissionsStr == undefined || colPermissionsStr == null) {
     return false;
    }
    if (colPermissionsStr.indexOf(columnName) > -1) {
     isExist = true;
    }
    return isExist;
  },
  checkButton:function(buttonName){
    let isExist = false;
    let btnPermissionsStr = store.getters.buttons;
    if (btnPermissionsStr == undefined || btnPermissionsStr == null) {
     return false;
    }
    if (btnPermissionsStr.indexOf(buttonName) > -1) {
     isExist = true;
    }
    return isExist;
  }
}